<?php

namespace km\util;

/**
 * Filter
 *
 * @author vbolshov
 */
class Filter {
	static function positiveInt($val)
	{
		return filter_var($val, FILTER_VALIDATE_INT, array('options' => array('min_range' => 1)));
	}
	static function positiveFloat($val, $precision = .01)
	{
		$val = filter_var($val, FILTER_VALIDATE_FLOAT);
		return ($val >= $precision);
	}
}